function TRAP_LOG = TRAP(samples, sr)


samples = filter([1 -0.97], 1, samples);   %preemfaza


pspectrum = powspec_TRAP(samples, sr);    %segmetacia, oknovanie, DFT


aspectrum = audspec_TRAP(pspectrum, sr);   %melova filtracia
 
LOG = log (aspectrum);                   %logaritmovanie  

 nLOG = size(LOG,2); 
 LOGx = [zeros(24,50) LOG zeros(24,50)];  %pridanie nul
 TRAP_LOG = []; 
      for i = 51 : nLOG+50     
        LOGxx = LOGx(: , i);        
        LOGxxx = [LOGx(: , i-50:i-1) LOGxx LOGx(: , i+1:i+50)];        %1s casove trajektorie
        TRAP_LOG = [TRAP_LOG LOGxxx];             
      end  
end